package controller.subsystemcom;

import controller.acquaintance.I_Mes_WorkCellController;
import client.IMesFacade;
import client.sharedRessources.Order;

public class MesCommunicator implements I_Mes_WorkCellController
{
	private IMesFacade mes;
	private static MesCommunicator instance;
	
	private MesCommunicator()
	{
		mes = client.CellFacade.getInstance();
	}
	
	public static MesCommunicator getInstance()
	{
		if (instance == null)
			instance = new MesCommunicator();
		return instance;
	}
	
	public void sendLogPML_Idle(long time, String comment)
	{
		mes.sendLogPML_Idle(time, comment);
	}

	public void sendLogPML_Execute(long time, String comment)
	{
		mes.sendLogPML_Execute(time, comment);
	}

	public void sendLogPML_Complete(long time, String comment)
	{
		mes.sendLogPML_Complete(time, comment);
	}

	public void sendLogPML_Held(long time, String comment)
	{
		mes.sendLogPML_Held(time, comment);
	}

	public void sendLogPML_Suspended(long time, String comment)
	{
		mes.sendLogPML_Suspended(time, comment);
	}

	public void sendLogPML_Aborted(long time, String comment)
	{
		mes.sendLogPML_Aborted(time, comment);
	}

	public void sendLogPML_Stopped(long time, String comment)
	{
		mes.sendLogPML_Stopped(time, comment);
	}

	public void sendLogOrder_Start(long time, String comment)
	{
		mes.sendLogOrder_Start(time, comment);
	}

	public Order getNewOrder()
	{
		return mes.getNewOrder();
	}

	public void orderCompleted(long time, String comment, String ticket)
	{
		mes.orderCompleted(time, comment, ticket);
	}	
}